<?php
if(isset($_REQUEST['img'])){
	include('../src/imarty.php');
	$imarty = new imarty($_REQUEST['img']);
	$imarty->render();

	if(isset($_REQUEST['format'])){
		$imarty->output_image($_REQUEST['format']);
	}else{
		$imarty->output_image('png');
	}
}elseif(isset($_REQUEST['ani'])){
	include('../src/animarty.php');
	$animarty = new animarty($_REQUEST['ani']);
	$animarty->render();
	$animarty->output();
}
?>